<style type="text/css">
	* {
		margin:0;
		padding:0;
	}
	.error_tip{
		height:auto;
		margin-left:20px;
		margin-top:10px;
		width:80%;
	}
</style>

<div class="error_tip"><?php echo $this->getMessagesBlock()->getGroupedHtml() ?></div>
<div id="YellowTitle">
    <?php echo $this->__('Edit Account Information') ?>
</div>
<div id="Title_Content"><?php echo $this->__('Account Info') ?><br/></div>

<div style="margin-left:20px">
<form action="<?php echo $this->getUrl('customer/account/editPost') ?>" method="post" id="form-validate">
<div>
    <?php echo $this->getBlockHtml('formkey')?>
    <ul class="form-list group-select" style="padding-top:10px">
        <li>
            <?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getCustomer())->toHtml() ?>
        </li>
        <li>
            <div class="input-box">
                <label for="email"><?php echo $this->__('Email Address') ?> <span class="required">*</span></label><br />
                <input type="text" name="email" id="email" value="<?php echo $this->htmlEscape($this->getCustomer()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text required-entry validate-email" />
            </div>
        </li>
    <?php $_dob = $this->getLayout()->createBlock('customer/widget_dob') ?>
    <?php if ($_dob->isEnabled()): ?>
        <li><?php echo $_dob->setDate($this->getCustomer()->getDob())->toHtml() ?></li>
    <?php endif ?>
    <?php $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat') ?>
    <?php if ($_taxvat->isEnabled()): ?>
        <li><?php echo $_taxvat->setTaxvat($this->getCustomer()->getTaxvat())->toHtml() ?></li>
    <?php endif ?>
        <li style="padding-top:10px">
            <input type="checkbox" name="change_password" id="change_password" value="1" onclick="setPasswordForm(this.checked)" title="<?php echo $this->__('Change Password') ?>"<?php if($this->getCustomer()->getChangePassword()==1): ?> checked="checked"<?php endif; ?> class="checkbox" /> <label for="change_password"><?php echo $this->__('Change Password') ?></label>
        </li>
    </ul>
</div>

<div style="display:none;">
    <ul class="form-list group-select">
        <li>
            <div class="input-box">
                <label for="current_password"><?php echo $this->__('Current Password') ?></label><br />
                <input type="password" class="input-text" name="current_password" id="current_password" />
            </div>
        </li>
        <li>
            <div class="input-box">
                <label for="password"><?php echo $this->__('New Password') ?></label><br />
                <input type="password" class="input-text validate-password" name="password" id="password" />
            </div>
            <div class="input-box">
                <label for="confirmation"><?php echo $this->__('Confirm New Password') ?></label><br />
                <input type="password" class="input-text validate-cpassword" name="confirmation" id="confirmation" />
            </div>
        </li>
    </ul>
</div>

<div class="buttons-set" style="width: 550px;">
    <input type="image" src="<?php echo $this->getSkinUrl('images/button_submit.jpg');?>" /><span style="padding-right:40px;padding-left:20px;">&nbsp;</span>
</div>
</form>
</div>

<script type="text/javascript">
//<![CDATA[
    var dataForm = new VarienForm('form-validate', true);
    function setPasswordForm(arg){
        if(arg){
            $('current_password').up(3).show();
            $('current_password').addClassName('required-entry');
            $('password').addClassName('required-entry');
            $('confirmation').addClassName('required-entry');

        }else{
            $('current_password').up(3).hide();
            $('current_password').removeClassName('required-entry');
            $('password').removeClassName('required-entry');
            $('confirmation').removeClassName('required-entry');
        }
    }
    <?php if($this->getCustomer()->getChangePassword()): ?>
        setPasswordForm(true);
    <?php endif; ?>
//]]>
</script>
